import java.awt.Frame;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
+import java.rmi.Naming;
+import java.rmi.RemoteException;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
+import common.HouseInterface;
+
+import configuration.___IntNames;
import domain.Owner;
public class OffersRelatedOwnerGUI extends JFrame {
JButton btnCreateOffers = new JButton("Create Offers");
btnCreateOffers.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
- Frame a = new AddOffersGUI(owner.getRuralHouses());
+ HouseInterface houseM=null;
+ try {
+ houseM = (HouseInterface) Naming
+ .lookup(___IntNames.HouseManager);
+ } catch (Exception e1) {
+ System.out.println("Error accessing remote authentication: "
+ + e1.toString());
+ }
+ Frame a = null;
+ try {
+ a = new AddOffersGUI(houseM.getHouses(owner, null, null, 0, 0, 0, 0, 0));
+ } catch (RemoteException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
a.setVisible(true);
}
});